namespace hjc {

	export abstract class Controller extends Singleton {

		protected $frame: boolean = false;
		protected $second: boolean = false;

		constructor() {
			super();
			this.init();
			this.notice();
			if (this.$frame) 
			if (this.$second) game.timer.registerBySeconds(1, this.onSecond, this);
		}
		protected init(): void { }
		protected notice(): void { }
		protected onFrame(param?: hjc.TimeParam): void { }
		protected onSecond(param?: hjc.TimeParam): void { }
	}

}

